﻿using D.Medicalcare.ErrorCode;
using D.Medicalcare.Write.API.Application.Commands.Instrufordelime;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;

namespace D.Medicalcare.Write.API.Controllers
{
    /// <summary>
    /// 病案须知
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class InstrufordelimeController : ControllerBase
    {

        private readonly IMediator mediator;

        public InstrufordelimeController(IMediator mediator)
        {
            this.mediator = mediator;
        }

        /// <summary>
        /// 病案须知添加
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<APIResult<int>> AddInstrufordelime(AddInstrufordelimeCommand request)
        {

            return await mediator.Send(request);
        }


        }
    }
